<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head> 
    <meta charset="UTF-8">
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
    <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
    <link rel="stylesheet" href="${ctxStatic}/css/layerSm.css">
    <script type="text/javascript">
    //删除方法
    function delEnchase(){
        // 调用后台删除方法
        $.post("${ctx}/enchase/single/delete?id=${enchase.id}",'',function(result){
             // 提示信息
             tipParent(result.message);
             // 返回状态
            if(result.statusCode==STATUSCODEOK){
                 // 刷新页面
                window.parent.frames[0].searchListForm();
                 // 关闭页面
                closeWin(); 
             }
        },'json');
   }
 	// 导出大货装箱单信息 
  	function exportEnchase() {
  		window.location.href='${ctx}/enchase/single/exportFile?id=${enchase.id}&packageNo=${enchase.packageNo}';
  	}
    </script> 
</head>
<body>   
<div class="layerHeader clearfix">
	<p class="headerTitle"><spring:message code="enchase_show_title"/></p>
    <div class="headerButton clearfix">
    <!-- 导出 -->
        <button type="button" onclick="exportEnchase();">导出</button>
        <c:if test="${enchase.deleteFlag != 1}">
        <!-- 删除 -->
        <button type="button" id="btnDel" onclick="del(delEnchase)"><spring:message code="role_delete"/></button>
        <!-- 编辑 -->
        <button type="button" id="btnEdit" onClick="window.location.href='${ctx}/enchase/single/form?id=${enchase.id}'"><spring:message code="write_style_btn"/></button>
        </c:if>
        <!-- 取消 -->
        <button type="button" onclick="closeWin()"><spring:message code="btn_cancle"/></button>
    </div>
</div>
<form id="inputForm" method="post" >
<div class="tabBoxSm">
 <div class="tabSm smOrderBox">
  <div style="height:180px;">
    <!-- 款式信息 -->
    <div class="left col-50">
         <p style="margin-top:0;margin-bottom:5px;margin-left:20px;"><span style="font-size:16px;"><spring:message code="enchase_show_styleInfo_title"/></span></p>
         <div class="tableArea">
        	<div class="tableScroll tableScrollSm" style="width:470px;height:142px;">
        		<table cellpadding="0" class="tableHead">
                    <thead>
                    <tr>
                        <!-- No. -->	
                    	<th style="width:30px;"><spring:message code="enchase_show_styleInfo_no"/></th>
                    	<!-- 合同单号 -->
                        <th><p style="width:80px;"><spring:message code="enchase_show_styleInfo_customerContractNo"/></p></th>
                        <!-- 款式编号 -->
                        <th><p style="width:80px;"><spring:message code="enchase_show_styleInfo_customerStyleNo"/></p></th>
                        <!-- 颜色 -->
                        <th style="width:70px;"><spring:message code="enchase_show_styleInfo_color"/></th>
                        <!--尺码  -->
                        <th style="width:50px;"><spring:message code="enchase_show_styleInfo_size"/></th>
                        <!-- 总件数 -->
                        <th style="width:70px;"><spring:message code="enchase_show_styleInfo_allQuantity"/></th>
                        <!-- 待装箱数 -->
                        <th style="width:70px;"><spring:message code="enchase_show_styleInfo_waitQuantity"/></th>
                    </tr>
                    </thead>
                </table>
                <table cellpadding="0" class="tableBody" id="tableIndentList">
                <c:if test="${not empty enchase.indentList}">
                    <tbody>
                    <c:forEach items="${enchase.indentList}" var="indentInfo" varStatus="status">
                    <tr>
                        <!-- NO -->
                    	<td style="width:30px;">${status.index+1}</td>
                    	<!-- 合同单号 -->
                        <td><p style="width:80px;" class="text_overflow" data-toggle='tooltip' title='${indentInfo.customerContractNo}'>${indentInfo.customerContractNo}</p></td>
                        <!-- 客户款式编号 -->
                        <td><p style="width:80px;" class="text_overflow" data-toggle='tooltip' title='${indentInfo.styleCustomerNo}'>${indentInfo.styleCustomerNo}</p></td>
                        <!-- 颜色 -->
                        <td style="width:70px;" class="styleInfoColor">${indentInfo.cartonColorName}</td>
                        <!-- 尺码 -->
                        <td style="width:50px;" class="styleInfoSizeName">${indentInfo.sizeName}</td>
                        <!-- 总件数 -->
                        <td style="width:70px;"><fmt:formatNumber value="${indentInfo.indentNumber}" pattern="#,##0"/></td>
                        <!-- 待装箱数 -->
                        <td class="tdIndentListUnPackNumber" style="width:70px;"><fmt:formatNumber value="${indentInfo.unPackNumber}" pattern="#,##0"/></td>
                    </tr>
                    </c:forEach>
                    </tbody>
                </c:if>
                </table>
            </div>
        </div>
    </div>
    <!-- 纸箱信息 -->
    <div class="right col-50">
         <p style="margin-top:0;margin-bottom:5px;margin-left:20px;"><span style="font-size:16px;"><spring:message code="enchase_show_cartonInfo_title"/></span></p>
         <div class="tableArea">
        	<div class="tableScroll tableScrollSm" style="width:484px;height:142px;">
        		<table cellpadding="0" class="tableHead">
                    <thead>
                    <tr>
                        <!-- No. -->
                    	<th style="width:30px;"><spring:message code="enchase_show_cartonInfo_no"/></th>
                    	<!-- 箱体名称 -->
                        <th style="width:100px;"><spring:message code="enchase_show_cartonInfo_cartonName"/></th>
                        <!-- 长 -->
                        <th style="width:55px;"><spring:message code="enchase_show_cartonInfo_length"/></th>
                        <!-- 宽 -->
                        <th style="width:55px;"><spring:message code="enchase_show_cartonInfo_width"/></th>
                        <!-- 高 -->
                        <th style="width:55px;"><spring:message code="enchase_show_cartonInfo_height"/></th>
                        <!-- 体积 -->
                        <th style="width:55px;"><spring:message code="enchase_show_cartonInfo_volume"/></th>
                        <!-- 箱重 -->
                        <th style="width:55px;"><spring:message code="enchase_show_cartonInfo_weight"/></th>
                        <!-- 总数 -->
                        <th style="width:60px;"><spring:message code="enchase_show_cartonInfo_allQuantity"/></th>
                    </tr>
                    </thead>
                </table>
                <table cellpadding="0" class="tableBody" id="tableCartonList">
                <c:if test="${not empty enchase.cartonInfoList}">
                    <tbody>
                    <c:forEach items="${enchase.cartonInfoList}" var="cartonInfo" varStatus="status">
                    	<tr>
                    	    <!-- NO -->
							<td style="width:30px;">${status.index+1}</td>
							<!-- 箱体名称 -->
							<td style="width:100px;">${cartonInfo.cartonName}</td>
							<!-- 长 -->
							<td style="width:55px;"><fmt:formatNumber value="${cartonInfo.cartonLength}" pattern="#,##0.####"/></td>
							<!-- 宽 -->
							<td style="width:55px;"><fmt:formatNumber value="${cartonInfo.cartonWidth}" pattern="#,##0.####"/></td>
							<!-- 高 -->
							<td style="width:55px;"><fmt:formatNumber value="${cartonInfo.cartonHeight}" pattern="#,##0.####"/></td>
							<!-- 体积 -->
							<td style="width:55px;"><fmt:formatNumber value="${cartonInfo.cartonVolume}" pattern="#,##0.####"/></td>
							<!-- 箱重 -->
							<td style="width:55px;"><fmt:formatNumber value="${cartonInfo.cartonWeight}" pattern="#,##0.####"/></td>
							<!-- 总数 -->
							<td class="tdCartonInfoListCartonNumber" style="width:60px;"><fmt:formatNumber value="${cartonInfo.cartonNumber}" pattern="#,##0"/></td>
						</tr>
					</c:forEach>	
                    </tbody>
                </c:if>    
                </table>
            </div>
        </div>
    </div>
  </div>
  <div>
      <div class="items clearfix" id="pagePackageStyleValue">
	      <p style="margin-top:0;margin-bottom:0px;margin-left:10px;"><span style="font-size:16px;"><spring:message code="enchase_show_package_title"/></span>
	      <!-- 总件数 -->
	      <span style="color:#d6392d;right:650px;position:absolute;"><spring:message code="enchase_show_package_allStyleQuantity"/><span class="pagePackageStyleQuantity"><fmt:formatNumber value="${enchase.packageStyleQuantity}" pattern="#,##0"/></span></span>
	      <!-- 总箱数 -->
	      <span style="color:#d6392d;right:500px;position:absolute;"><spring:message code="enchase_show_package_allCartonQuantity"/><span class="pagePackageQuantity"><fmt:formatNumber value="${enchase.packageQuantity}" pattern="#,##0"/></span></span>
	      <!-- 总毛重 -->
	      <span style="color:#d6392d;right:350px;position:absolute;"><spring:message code="enchase_show_package_allRoughtWeight"/><span class="pagePackageRoughWeight"><fmt:formatNumber value="${enchase.packageRoughWeight}" pattern="#,##0.####"/></span></span>
	      <!-- 总净重 -->
	      <span style="color:#d6392d;right:200px;position:absolute;"><spring:message code="enchase_show_package_allNetWeight"/><span class="pagePackageNetWeight"><fmt:formatNumber value="${enchase.packageNetWeight}" pattern="#,##0.####"/></span></span>
	      <!-- 总体积 -->
	      <span style="color:#d6392d;right:50px;position:absolute;"><spring:message code="enchase_show_package_allVolume"/><span class="pagePackageVolume"><fmt:formatNumber value="${enchase.packageVolume}" pattern="#,##0.####"/></span></span>
	      </p>
      </div>
      <div class="tableArea">
     	<div class="tableScroll tableScrollSm" style="width:963px;height:281px;">
     		<table cellpadding="0" class="tableHead">
                 <thead>
                 <tr>
                     <!-- 操作 -->
                 	 <th rowSpan="2" style="width:30px;"><spring:message code="enchase_show_package_operate"/></th>
                 	 <!-- 合同单号 -->
                     <th rowSpan="2"><p style="width:70px;"><spring:message code="enchase_show_package_customerContractNo"/></p></th>
                     <!-- 款式编号 -->
                     <th rowSpan="2"><p style="width:70px;"><spring:message code="enchase_show_package_customerStyleNo"/></p></th>
                     <!-- 国别 -->
                     <th rowSpan="2" style="width:60px;"><spring:message code="enchase_show_package_country"/></th>
                     <!-- 包装类型 -->
                     <th rowSpan="2" style="width:60px;"><spring:message code="enchase_show_package_packageStyle"/></th>
                     <!-- 颜色 -->
                     <th rowSpan="2" style="width:60px;"><spring:message code="enchase_show_package_color"/></th>
                     <!-- 箱号 -->
                     <th rowSpan="2" style="width:70px;"><spring:message code="enchase_show_package_cartonNo"/></th>
                     <!-- 箱数 -->
                     <th rowSpan="2" style="width:50px;"><spring:message code="enchase_show_package_cartonQuantity"/></th>
                     <!-- 箱体名称 -->
                     <th rowSpan="2" style="width:60px;"><spring:message code="enchase_show_package_cartonName"/></th>
                     <!-- 每箱件 -->
                     <th rowSpan="2" style="width:50px;"><spring:message code="enchase_show_package_singleQuantity"/></th>
                     <!-- 净重 -->
                     <th rowSpan="2" style="width:40px;"><spring:message code="enchase_show_package_netWeight"/></th>
                     <!-- 总件数 -->
                     <th rowSpan="2" style="width:50px;"><spring:message code="enchase_show_package_allQuantity"/></th>
                     <!-- 每箱尺寸搭配 -->
                     <th colSpan="8" style="width:272px;"><spring:message code="enchase_show_package_cartonSize"/></th>
                 </tr>
                 <tr id="trHeadPackageDetailsSize">      
                     <th style="width:34px;">${enchase.allSizeList[0].sizeName}</th>
                     <th style="width:34px;">${enchase.allSizeList[1].sizeName}</th>
                     <th style="width:34px;">${enchase.allSizeList[2].sizeName}</th>
                     <th style="width:34px;">${enchase.allSizeList[3].sizeName}</th>
                     <th style="width:34px;">${enchase.allSizeList[4].sizeName}</th>
                     <th style="width:34px;">${enchase.allSizeList[5].sizeName}</th>
                     <th style="width:34px;">${enchase.allSizeList[6].sizeName}</th>
                     <th style="width:34px;">${enchase.allSizeList[7].sizeName}</th>
                 </tr>
                 </thead>
             </table>
             <table cellpadding="0" class="tableBody" >
                 <tbody>
                 <tr>
                     <td style="width:30px;"></td>
                     <td><p style="width:70px;"></p></td>
                     <td><p style="width:70px;"></p></td>
                     <td style="width:60px;"></td>
                     <td style="width:60px;"></td>
                     <td style="width:60px;"></td>
                     <td style="width:70px;"></td>
                     <td style="width:50px;"></td>
                     <td style="width:60px;"></td>
                     <td style="width:50px;"></td>
                     <td style="width:40px;"></td>
                     <td style="width:50px;"></td>
                     <td style="width:34px;"></td>
                     <td style="width:34px;"></td>
                     <td style="width:34px;"></td>
                     <td style="width:34px;"></td>
                     <td style="width:34px;"></td>
                     <td style="width:34px;"></td>
                     <td style="width:34px;"></td>
                     <td style="width:34px;"></td>
                 </tr>
                 </tbody>
             </table>
             <table cellpadding="0" id="tablePackageDetailsList">
                <c:if test="${not empty enchase.packageDetailsList}">
                    <tbody>
                    <c:forEach items="${enchase.packageDetailsList}" var="packageDetailsInfo" varStatus="status">
                    <tr>
                        <!-- 删除 -->
                        <td style="width:30px;"></td>
                        <!-- 合同单号 -->
                        <td><p style="width:70px;" class="text_overflow" data-toggle='tooltip' title='${packageDetailsInfo.customerContractNo}'>${packageDetailsInfo.customerContractNo}</p></td>
                        <!-- 款式编号 -->
                        <td><p style="width:70px;" class="text_overflow" data-toggle='tooltip' title='${packageDetailsInfo.styleCustomerNo}'>${packageDetailsInfo.styleCustomerNo}</p></td>
                        <!-- 国别 -->
                        <td style="width:60px;">${fns:getDictName(packageDetailsInfo.countryCd)}</td>
                        <!-- 包装类型 -->
                        <td style="width:60px;">${fns:getDictName(packageDetailsInfo.packageStyle)}</td>
                        <!-- 颜色 -->
                        <td style="width:60px;">${packageDetailsInfo.cartonColorName}</td>
                        <!-- 箱号 -->
                        <td style="width:70px;">${packageDetailsInfo.cartonNoFrom}~${packageDetailsInfo.cartonNoTo}</td>
                        <!-- 箱数 -->
                        <td class="tdPackageListCartonQuantity" style="width:50px;">${packageDetailsInfo.cartonQuantity}</td>
                        <!-- 箱体名称 -->
                        <td style="width:60px;">${packageDetailsInfo.cartonName}</td>
                        <!-- 每箱件 -->
                        <td class="tdPackageListSingleCarton" style="width:50px;">${packageDetailsInfo.singleCarton}</td>
                        <!-- 净重 -->
                        <td style="width:40px;"><fmt:formatNumber value="${packageDetailsInfo.cartonNetWeight}" pattern="##0.#####"/></td>
                        <!-- 总件数 -->
                        <td class="tdPackageListMoreCarton" style="width:50px;">${packageDetailsInfo.moreCarton}</td>
                        <!-- 尺码明细 -->
                        <c:forEach items="${packageDetailsInfo.allSizeList}" var="packageDetailsSizeInfo" varStatus="sizeStatus">
                        <!-- 尺码 -->
                        <c:if test="${not empty packageDetailsSizeInfo.sizeName}">
                            <td class="subSize" style="width:34px;">${packageDetailsSizeInfo.cartonStyleQuantity}</td>
                        </c:if>
                        <c:if test="${empty packageDetailsSizeInfo.sizeName}">
                            <td style="width:34px;background-color:#e4e4e4;"></td>
                        </c:if>
                        </c:forEach>
                    </tr>
                    </c:forEach>
                    </tbody>
                </c:if>   
             </table>
         </div>
      </div>
  </div>
 </div>
</div>
</form>
</body>
</html>